<template>
    <div>
        <func-bar v-on:setIndex="setIndex" :bars="bars"></func-bar>
        <router-view></router-view>
    </div>
</template>

<script>
import FuncBar from "@/components/global/component/Funcbar";
export default {
 data() {
    return {
      index:0,
      bars:[
        {"icon":"mdi-face-recognition", "color":"red", "notify": true, "info": "番茄闹钟"},
        // {"icon":"mdi-clipboard-list-outline", "color":"green", "notify": false, "info": "种树"},
      ]
    }
  },
  components:{FuncBar},
  methods:{
    setIndex(index) {
      this.index = index
      switch(index) {
        case 0:
            this.$router.push('/xbig/clock')
          break;
        case 1:
            this.$router.push('/xbig/plant')
          break;
      }
    }
  }
}
</script>

<style>

</style>